% RK4积分函数
function x_next = RK4(f, x, h)
    k1 = f(0, x);
    k2 = f(0, x + h/2 * k1);
    k3 = f(0, x + h/2 * k2);
    k4 = f(0, x + h * k3);
    x_next = x + h/6 * (k1 + 2*k2 + 2*k3 + k4);
end